<template>
  <basic-container class="noScrollBar tabMain-wrap">
    <common-template
        ref="detailRef"
        :detailOptions="detailOptions"
        :flowStatus="flowStatus"
        :flowModelId="flowModelId"
        :filePrint="filePrint"
    ></common-template>
  </basic-container>
</template>

<script>
import commonTemplate from "../commonTemplate";
import {
  xnyFlowModelId,
  getXnybwxnViewList,
  xnyPrint,
} from "@/api/sxdky/sxdky";
export default {
  data() {
    return {
    // 流程模型
    flowModelId:xnyFlowModelId,
    // 流程按钮状态
    flowStatus:false,
    // 文件打印
    filePrint:xnyPrint,
    detailOptions: {
      label: "新能源并网性能高报告查询",
      name: "reportViewList",
      options: {
          height: "calc(100vh - 425px)",
          addBtn: false,
          menuDelBtn: false,
          menuUpBtn: false,
          menuDownBtn: true,
          dialogDirection: "ltr",
          dialogType: "drawer",
          calcHeight: 30,
          tip: false,
          searchShow: true,
          searchMenuSpan: 6,
          border: true,
          index: true,
          indexLabel: "序号",
          viewBtn: false,
          selection: true,
          excelBtn: false,
          dialogClickModal: false,
          // 自定义操作按钮，下载上传
          menuOtherBtn: true,
          gistBtn: false,
          align: "center",
          menuAlign: "center",
          searchIcon: true,
          searchIndex: 3,
          labelWidth: 120,
          editBtn: false,
          delBtn: false,
          printBtn: false,
          column: [
              {
                  label: "检测报告",
                  prop: 'reportUploadName',
                  type: "upload",
                  showFileList: true,
                  loadText: "模板上传中，请稍等",
                  span: 24,
                  propsHttp: {
                      res: "data.data.object",
                  },
                  slot:true,
                  accept: ".docx,.doc,",
                  tip: "请上传 .doc,.docx 标准格式文件",
                  action: '/api/dis-report/dnzl/upload',
              },
              {
                  label: "报告名称",
                  prop: "reportUploadName",
                  editDisplay: false,
                  hide:true,
                  viewDisplay: false,
                  overHidden: true,
                  search: false,
                  addDisplay:false,
                  rules: [
                      {
                          message: "请输入报告名称",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "付款凭证",
                  prop: 'payProof',
                  type: "upload",
                  listType:'picture-card',
                  multiple:true,
                  limit: 5,
                  showFileList: true,
                  loadText: "模板上传中，请稍等",
                  span: 24,
                  propsHttp: {
                      res:"data.data"
                  },
                  slot:true,
                  accept: ".png,.jpeg",
                  tip: "请上传 .png,.jpeg,标准格式文件",
                  action: '/api/dis-report/xnybwxn/payProofUpload',
              },

              {
                  label: "付款凭证",
                  prop: "payProof",
                  editDisplay: false,
                  hide:true,
                  viewDisplay: false,
                  overHidden: true,
                  search: false,
                  addDisplay:false,
              },
              {
                  label: "报告编号",
                  prop: "reportNum",
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  search: true,
              },
              {
                  label: "报告名称",
                  prop: "reportName",
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  search: true,
                  span:24,
                  rules: [
                      {
                          required: true,
                          message: "请输入报告名称",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "项目编号",
                  prop: "projectNum",
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  search: true,
                  rules: [
                      {
                          required: true,
                          message: "请输入项目编号",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "项目负责人",
                  prop: "manager",
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  search: true,
              },
              {
                  label: "试验地点",
                  prop: "checkSite",
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  search: true,
                  rules: [
                      {
                          required: true,
                          message: "请输入试验地点",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "试验人员",
                  prop: "testMan",
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  search: true,
                  rules: [
                      {
                          required: true,
                          message: "请输入试验人员",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "试验单位",
                  prop: "testDept",
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  search: true,
                  rules: [
                      {
                          required: true,
                          message: "请输入试验单位",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "监督人员",
                  prop: "superviseMan",
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  search: true,
                  rules: [
                      {
                          required: true,
                          message: "请输入监督人员",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "监督单位",
                  prop: "superviseDept",
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  search: false,
                  rules: [
                      {
                          required: true,
                          message: "请输入监督单位",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "报告打印",
                  prop: "printMan",
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  search: true,
              },
              {
                  label: "校阅",
                  prop: "reviewer",
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  search: true,
              },

              {
                  label: "报告页数",
                  prop: "page",
                  type: "number",
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  sortable: true,
                  controlsPosition: "top",
              },
              {
                  label: "出版份数",
                  prop: "pubCount",
                  type: "number",
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  sortable: true,
                  controlsPosition: "top",
              },
              {
                  label: "提交人",
                  prop: "submitName",
                  search: true,
                  addDisplay:false,
                  editDisplay: false,
                  viewDisplay: false,
                  overHidden: true,
              },
              {
                  label: "审批人",
                  prop: "flowOperator",
                  search: true,
                  addDisplay:false,
                  editDisplay: false,
                  viewDisplay: true,
                  overHidden: true,
              },
              {
                  label: "处理状态",
                  prop: "submitStatus",
                  type: "select",
                  search: true,
                  addDisplay:false,
                  editDisplay: false,
                  viewDisplay: false,
                  dicData: [
                      {
                          label: "新建",
                          value: 0,
                      },
                      {
                          label: "审核中",
                          value: 1,
                      },
                      {
                          label: "已审核",
                          value: 2,
                      },
                      {
                          label: "已退件",
                          value: 3,
                      },
                  ],
              },
          ],
        },
        url: {
          getList: getXnybwxnViewList,
        },
      },
    };
  },
  components: {
      commonTemplate,
  },
  computed: {},
  methods: {},

};
</script>

<style lang='scss'>
.tabMain-wrap {
  // height: calc(100vh - 400px);
  overflow: hidden auto;
}
</style>
